<div class="container"  style="width:90%">
       
   <ul class="nav nav-tabs">
        <li class="active"><a href="#tabTabla" data-toggle="tab">Previos</a></li>
        <li><a href="#tabCalendar" data-toggle="tab">Calendario</a></li>
        <div class="btn-group pull-right">
            <a class="btn" href="#"> Acciones</a>
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
            <ul class="dropdown-menu" >
                <li><a href="#modalPrevios" onClick="$('#agregarPrevio').reset()" data-toggle="modal"><i class="icon-calendar"></i> Programar Previo</a></li>
                <li class="divider"></li>
                <li class="dropdown-submenu pull-left">
                    <a tabindex="-1" href="#">Tipos de Previos</a>
                    <ul class="dropdown-menu">
                        <li><a href="#modalTipoPrevio" data-toggle="modal"><i class="icon-plus"></i> Agregar</a></li>
                        <?php  if (  count($tipoPrevios) > 0) {?>
                        <li class="dropdown-submenu pull-left">
                            <a tabindex="-1" href="#"><i class="icon-pencil"></i> Editar</a>
                            <ul class="dropdown-menu">
                                <?php foreach($tipoPrevios as $row) { ?> 
                                   <li><a href="<?php echo base_url() ?>encuestas/edicion_encuestas_controller/index/<?php echo $row->idEncuesta ?>" data-toggle="modal"> <?php echo $row->Nombre?></a></li>
                                <?php } ?>
                            </ul>
                        </li>
                        <?php } ?>
                    </ul>
                </li>
            </ul>
        </div>
    </ul>
    <div class="tab-content">
        <div class="tab-pane active" id="tabTabla">
                <table  id="gridPrevios" class="table table-condensed" width="100%">
                    <thead>
                    <tr class="headTable">
                        <th></th>
                        <th class="span2"><center>Estado</center></th>
                        <th class="span2"><center>Referencia</center></th>
                        <th class="span3"><center>Responsable</center></th>
                        <th class="span3"><center>Tipo de Previo</center></th>
                        <th class="span2"><center>Fecha Estimada</center></th>
                        <th class="span3"><center>Cliente</center></th>
                        <th class="span2"></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php   foreach ($datos as $row) { ?>
                            <tr id="<?php echo $row['idPrevio']; ?>">
                                <td><input type="checkbox" name="estudio[]" id="<?php echo $row['idPrevio']; ?>" value="<?php echo $row['idPrevio']; ?>"></td>
                                <td><?php echo $row['Estado']; ?></td>
                                <td><?php echo $row['Referencia']; ?></td>
                                <td><?php echo $row['Responsable']; ?></td>
                                <td><?php echo $row['Tipo de Previo']; ?></td>
                                <td><center><?php echo $row['Fecha Estimada']; ?></center></td>
                                <td><?php echo $row['Cliente']; ?></td>
                                <td>
                                    <center>
                                        <a class="btn btn-info" title="Ver Imagenes" onClick="mostrarImagenes(<?php echo $row['idPrevio']; ?>)" ><i class="icon-picture icon-white"></i></a>
                                        <a class="btn btn-success" title="Ver Reporte" href="previos/viewPdf/<?php echo $row['idPrevio']; ?>"><i class="icon-file icon-white"></i></a>
                                    </center>
                                </td>
                             </tr>
                    <?php  } ?>
                    </tbody>
                    
                </table>
        </div>
        <div class="tab-pane" id="tabCalendar">
            <div id="calendario">
                
            </div>
        </div>
   </div>
</div> <!-- /container-->
